<template>
  <div class="input-add">
    <input
      :value="modelValue"
      @input="$emit('update:modelValue', $event.target.value)"
      @keyup.enter="$emit('add', modelValue)"
      name="todo"
      type="text"
    >
    <button @click="$emit('add', modelValue)">
      <i class="plus"></i>
    </button>
  </div>
</template>

<script setup>

const props = defineProps(['modelValue'])

const emits = defineEmits(['update:modelValue', 'add'])

</script>

<style lang="scss" scoped></style>